home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / lldemo / lldemo.shr / ROSETTA.EXE / ROSETTA.DXR / 00583_response scripts.ls < prev    next >
Encoding:
Text File  |  1996-06-24  |  2.4 KB  |  84 lines

  1. global hasClicked
  2.  
  3. on drawAllResponses
  4.   global gResponseOrder, gCurQuad, gScreenMode
  5.   if getaProp(gScreenMode, #TXTRESP) <> #NONE then
  6.     showTextPuppets()
  7.   end if
  8.   if getaProp(gScreenMode, #PCTRESP) <> #NONE then
  9.     set base to getQuadBase(gCurQuad)
  10.     repeat with i = 0 to 3
  11.       set index to value(char i + 1 of gResponseOrder)
  12.       setResponsePict(i, base + index - 1)
  13.     end repeat
  14.   end if
  15.   puppetTransition(7, 0, 128, 1)
  16.   updateStage()
  17. end
  18.  
  19. on giveResponse which
  20.   global gPage, gResponseOrder, gDictNum, gPathList, gScreenMode, gNormSize, gDictMode, gHasPressed
  21.   set index to value(char which of gResponseOrder) + ((gPage - 1) * 4)
  22.   if gHasPressed = 0 then
  23.     if isDict() then
  24.       hideTextPuppets()
  25.       hide6()
  26.       if (gDictMode = #CLICKPICT) and (gDictNum = 0) then
  27.         hideDict()
  28.       else
  29.         if which <> gDictNum then
  30.           hideDict()
  31.           updateStage()
  32.           showDict(which)
  33.           set gDictNum to which
  34.         end if
  35.       end if
  36.     end if
  37.     if gHasPressed = 0 then
  38.       setPos6(2 + which - 1)
  39.       if ((getaProp(gScreenMode, #TXTRESP) = #NONE) and (getaProp(gScreenMode, #mode) = "A")) or (isDict() and (gDictMode = #CLICKPICT)) then
  40.         alignResponse(which, gResponseOrder, gPage, gNormSize)
  41.         setBorderHighlight("highlight pict/text resp")
  42.         setTextPuppetPos(which)
  43.       else
  44.         if getaProp(gScreenMode, #SCREEN) = #TYPE2 then
  45.           setBorderHighlight("highlight text resp")
  46.         else
  47.           setBorderHighlight("highlight no snd resp")
  48.         end if
  49.       end if
  50.       updateStage()
  51.     end if
  52.     if gHasPressed = 0 then
  53.       if getaProp(gScreenMode, #SNDRESP) <> #NONE then
  54.         set fname to makeImagePath(gPathList, #sound, index)
  55.         sound playFile 1, fname
  56.         updateStage()
  57.       end if
  58.       set nextTime to the ticks + 60
  59.       repeat while soundBusy(1) and not (the mouseDown)
  60.       end repeat
  61.     end if
  62.     if not isDict() then
  63.       hide6()
  64.       if (getaProp(gScreenMode, #TXTRESP) = #NONE) and (getaProp(gScreenMode, #mode) = "A") then
  65.         hideTextPuppet(which)
  66.       end if
  67.     end if
  68.   end if
  69.   hideOverlay()
  70.   updateStage()
  71. end
  72.  
  73. on hideAllResponses
  74.   global gScreenMode
  75.   if getaProp(gScreenMode, #PCTRESP) <> #NONE then
  76.     blankResponsePicts()
  77.   end if
  78.   if getaProp(gScreenMode, #TXTRESP) <> #NONE then
  79.     hideTextPuppets()
  80.   end if
  81.   puppetTransition(7, 0, 128, 1)
  82.   updateStage()
  83. end
  84.